package com.example.javafx.service;

import com.example.javafx.entity.User;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    public String getWelcomeMessage() {
        return "欢迎使用集成 Spring Boot 的 JavaFX 应用！";
    }

    public List<User> getAllUsers() {
        // 实际项目中调用数据库或 API
       User user = new User();
       user.setUsername("张三");
        User user1 = new User();
        user1.setUsername("李四");
//        List.of(new User("zhangsan"), new User(), new User());
        return List.of(user, user1);
    }
}
